<h3><?php echo $this->title?></h3>
<div class="upload-image">
<div style="color:red;"><?php echo $this->errMessage;?></div>
<a href="/admin/banner/edit/position/<?php echo $this->positionId?>?album=<?php echo $this->album?>" style="font-weight: bold">Thêm mới</a>
<?php if(is_array($this->banners)) {?>
    <table class="table table-bordered table-striped">
        <thead>
              <tr>
                <th>Hình ảnh</th>
                <th>Ngày cập nhật</th>
                <th>Ngày tạo</th>
                <th>Hiện trên web</th>
                <td>Miêu tả</td>
                <th>Thao tác</th>
              </tr>
        </thead>
        <tbody>
            <?php foreach($this->banners as $banner) :?>
             <tr>
                 <td>
                     <a class="fancy" href="<?php echo $this->staticUrl . '/' . $banner['image']?>">
                         <img src="<?php echo $this->staticUrl . '/' . $banner['image']?>" width="100" height="100"/>
                     </a>
                 </td>
                 <td><?php echo date('d/m/Y', $banner['last_update'])?></td>
                 <td><?php echo date('d/m/Y', $banner['dateline'])?></td>
                 <td>
                     <?php if($banner['active']) {?>
                     <i class="icon-ok"></i>
                     <?php } else {?>
                     <i class="icon-lock"></i>
                     <?php }?>
                 </td>
                 <td><?php echo $banner['note'];?></td>
                 <td>
                     <a href="/admin/banner/edit/id/<?php echo $banner['id']?>/position/<?php echo $this->positionId;?>?album=2">
                         <i class="icon-edit"></i>
                     </a>
                     <a href="/admin/banner/delete/id/<?php echo $banner['id']?>/position/<?php echo $this->positionId;?>" onclick="return confirm('sure?');">
                         <i class="icon-remove"></i>
                     </a>
                 </td>
             </tr>
             <?php endforeach;?>
        </tbody>
      </table>
</div>
<?php } else {?>
<div>Không tìm thấy thông tin!</div>
<?php }?>
